import request from '@/utils/request'

// 查询告警设置列表
export function listAlarmSetting(data) {
  return request({
    url: '/alarmSetting/listAlarmSetting',
    method: 'post',
    data: data
  })
}

// 查询告警设置详细
export function getAlarmSetting(id) {
  return request({
    url: '/alarmSetting/getAlarmSettingById?id=' + id,
    method: 'get'
  })
}

// 新增告警设置
export function addAlarmSetting(data) {
  return request({
    url: '/alarmSetting/addAlarmSetting',
    method: 'post',
    data: data
  })
}

// 修改告警设置
export function updateAlarmSetting(data) {
  return request({
    url: '/alarmSetting/editAlarmSetting',
    method: 'post',
    data: data
  })
}

// 删除告警设置
export function delAlarmSetting(id) {
  return request({
    url: '/alarmSetting/delAlarmSetting?ids=' + id,
    method: 'delete'
  })
}

// 删除告警设置
export function editPushStatus(data) {
  return request({
    url: `/alarmSetting/editPushStatus?id=${data.id}&pushStatus=${data.pushStatus}`,
    method: 'get'
  })
}
